import { createRouter, createWebHistory } from 'vue-router'
import HomeView from "@/views/home/HomeView.vue";
import WalletView from "@/views/WalletView.vue";
import BannerArticle from "@/components/market/banner/BannerArticle.vue";
import MessageDetails from "@/components/market/message/MessageDetails.vue";
import AllMessage from "@/components/market/message/AllMessage.vue";
import QuickBuy from "@/components/market/quickbuy/QuickBuy.vue";
import Money from "@/components/market/money/Money.vue";
import StartUp from "@/components/market/startup/StartUp.vue";
import ContractView from "@/views/contract/ContractView.vue";
import NewsView from "@/views/news/NewsView.vue";
import AddNew from '@/components/News/addNew.vue';
import LoginView from "@/views/account/LoginView.vue";
import RegisterView from "@/views/account/RegisterView.vue";
import CoinsView from '@/views/Coin/CoinsView.vue';
import WalletAccountView from '@/views/WalletAccountView.vue';


const routes = [
  {
    path: '/',
    name: 'Login',
    component: LoginView,
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: LoginView
  },{
    path: '/register',
    name: 'Register',
    component: RegisterView
  },
  {
  path: '/home',
    name: 'home',
    component: HomeView

  },{
  path: '/bannerArticle/:id',
    name: 'bannerArticle',
    component: BannerArticle
  },{
  path: '/messageDetails/:id',
    name: 'MessageDetails',
    component: MessageDetails
  },
  {
    path:'/allMessage',
    name:'AllMessage',
    component:AllMessage
  },{
  path: '/transaction',
    name: 'Transaction',
    component: QuickBuy
  },{
  path: '/money',
    name: 'Money',
    component: Money
  },
  {
    path: '/startup',
    name: 'StartUp',
    component: StartUp
  },{
  path: '/contract',
    name: "Contract",
    component: ContractView
  },{
  path: '/news',
    name: 'news',
    component: NewsView


  },{
    path:'/addNew',
    name:'AddNew',
    component:AddNew
  },{

    path:'/wallet',
    name:'Wallet',
    component:WalletView
  }
  ,{

    path:'/Coin',
    name:'Coin',
    component:CoinsView
  },{

    path:'/walletaccount',
    name:'Walletaccount',
    component:WalletAccountView
  }

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
